package de.haw.shc.Message;

import org.json.JSONObject;

/**
 * Created with IntelliJ IDEA.
 * User: mizus
 * Date: 08.05.13
 * Time: 14:14
 * To change this template use File | Settings | File Templates.
 */
public class SHC_Message {

    JSONObject myJsonObj;
    String topic, action, message;
    String typ = "Topic";


    public JSONObject getJsonObj() {
        return myJsonObj;
    }

    public String getTyp() {
        return typ;
    }

    public String getMessage(){
        return message;
    }



    public String getAction() {
        return action;
    }


    public String getTopic() {
        return topic;
    }

    public void setTyp(String typ) {
        this.typ = typ;
    }

    public SHC_Message(JSONObject aJsonObject, String aTopic, String aAction){
        myJsonObj = aJsonObject;
        topic = aTopic;
        action = aAction;
        message = myJsonObj.toString();
    }


    public SHC_Message(JSONObject aJsonObject, String aTopic){
        myJsonObj = aJsonObject;
        topic = aTopic;
        message = myJsonObj.toString();
    }


}
